<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>React</title>
    <script src="../build/react.js"></script>
    <script src="../build/react-dom.js"></script>
    <script src="../build/browser.min.js"></script>
  </head>
  <body>
    <div id="example"></div>
    <script type="text/babel">
      let MyComponent=React.createClass({
        handleClick: function(){
          // this.refs.myTextInput.focus();
          this.refs.myTextInput.style.padding="20px"
        },
        render: function() {
          return (
            <div>
              <input type="text" ref="myTextInput" />
              <input type="button" value="Focus the text input" onClick={this.handleClick} />
            </div>
          )
        }
      });

      ReactDOM.render(
        <MyComponent></MyComponent>,
        document.getElementById('example')
      );
    </script>
  </body>
</html>
